import java.util.*;

public class Room 
{
    public String description;
    private Map<String, Room> map;
    Thing thing = null;

    
    public Room(String description) 
    {
        this.description = description;
        this.map = new HashMap<>();
    }
    
    public Room(String description, Thing thing) {
        this(description);
        this.thing = thing;
    }
    
    public void setExit(String direction, Room exit) {
        this.map.put(direction, exit);
    }
    
    public Room goRoom(String direction) {
        return this.map.get(direction);
    }
    
    public void printExits() {
        System.out.println("Exits: ");
        for(String key : map.keySet()) {
            System.out.print(key + " ");
        }
        System.out.println();
    }
    
    
    public String getDescription()
    {
        return description;
    }
    
    public Thing getThings() {
        return this.thing;
    }
    
    public String getThing(){
       if(this.thing == null){
          String c="没有道具";
          return c;
        }else{
          return this.thing.name;
        }
    }
    
    public void removeThing() {
        this.thing = null;
    }

}
    